package org.ttitfly.workflow.factory;

/**
 * jdk反射生成对象
 * 
 * @author 潘海春
 * @version 2008-12-28
 */
public class ReflectClassCreator implements ObjectCreator {

	@Override
	public Object createObject(String name)
			throws ObjectNameUnavailableException {
		try {
			return Class.forName(name).newInstance();
		} catch (Exception e) {
			throw new ObjectNameUnavailableException("不能创建类名为[" + name + "]的对象！", e);
		}
	}
}
